package cn.tyf.filter;

import org.springframework.stereotype.Controller;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


/**
 * 监听器 ，为了设备状态
 */
@Controller
public class SystemListener implements ServletContextListener {


    @Override
    public void contextInitialized(ServletContextEvent sce) {
        String contextPath = sce.getServletContext().getContextPath();
        sce.getServletContext().setAttribute("PATH",contextPath);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
